<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>绑定淘宝</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
</head>

<body>
  <header class="aui-bar aui-bar-nav aui-bar-light" id="header" style="height:60px;line-height:60px">
  <a class="aui-pull-left aui-btn" tapmode onclick="api.closeWin();" style="height:60px;line-height:60px">
      <span class="aui-iconfont aui-icon-left"></span>
  </a>
  <div class="aui-title">绑定淘宝账号</div>

</header>
<div style="padding:0 20px">
    <ul class="aui-list aui-form-list" onclick="fnSelectCreditRating()" style="border:1px solid #03a9f4">
        <li class="aui-list-item">
            <div class="aui-list-item-inner" style="padding:0 10px">
                <div class="aui-list-item-label-icon">
                    信誉：
                </div>
                <div class="aui-list-item-input" id="id1">
                  <!-- <select name="" id="">
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                    <option value="">1</option>
                  </select> -->
                     <span style="color: #aab2bd;">选择信誉等级</span>
                </div>
            </div>
        </li>
    </ul>
</div>
  <footer class="aui-bar aui-bar-tab" id="footer" style="background:#03a9f4;color:#fff;line-height:55px;" onclick="fnTaobaoBind()">
      <div>绑定账号</div>

  </footer>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
    apiready = function() {
      initEventListenner();
      var currentCity = $api.getStorage('currentCity');
      if (!currentCity) {
            $("#id1").html('<span style="color: #aab2bd;">选择信誉等级</span>');
          return;
      }else{
          $("#id1").html('<img src="'+currentCity+'" alt="">');
      }
  };

  function initEventListenner() {
      api.addEventListener({
          name: 'cityChange'
      }, function(ret, err) {
          if (ret) {
              //alert(JSON.stringify(ret));
              // var city = $api.byId('id1');
              // city.innerHTML = ret.value.currentCity;
              $("#id1").html('<img src="'+ret.value.currentCity+'" alt="">');
              // var arrow = $api.byId('arrow');
              // if ($api.hasCls(arrow, 'active')) {
              //     $api.removeCls(arrow, 'active');
              // }

          } else {
              alert(JSON.stringify(err));
          }
      })
    }



function fnSelectCreditRating() {
    // api.actionSheet({
    //     //title: '底部弹出框测试',
    //     //cancelTitle: '这里是取消按钮',
    //     //destructiveTitle: '红色警告按钮',
    //
    //     buttons: ['1', '2', '3']
    // }, function(ret, err) {
    //     var index = ret.buttonIndex;
    // });
    api.openFrame({
        name: 'select_credit_rating_frame',
        url: './select_credit_rating_frame.html',
        bgColor: 'rgba(0, 0, 0, 0.5)',
        rect: {
            x: 0,
            y: 0,
            w: 'auto',
            h: 'auto'
        },
        pageParam: {
            name: 'test'
        },

        bounces: false
    });

}

</script>

</html>
